#define _CRT_SECURE_NO_WARNINGS 1

int findMaxK(int* nums, int numsSize) {
    int* cur1 = nums;
    int* cur2 = nums;
    int max = 0;
    for (int i = 0; i < numsSize; i++)
        for (int j = i; j < numsSize; j++)
        {
            if (*(cur1 + i) == -*(cur2 + j) && abs(*(cur1 + i)) >= max)
            {
                max = abs(*(cur1 + i));
                break;
            }
        }
    if (max != 0)
        return max;
    return -1;
}